/**
 * 实现一个日期类
 */

public class MyDate {
    public int year;
    public int month;
    public int day;

    //普通成员方法
    public void setDate(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void PrintDate(){
        System.out.println(this.year + " " + this.month + " " +this.day);
    }

    public static void main(String[] args) {
        MyDate date1 = new MyDate();
        date1.setDate(2022, 2, 2);
        MyDate date2 = new MyDate();
        date2.setDate(2022, 3, 4);
        date1.PrintDate();
        date2.PrintDate();
    }
}
